
export const trColumnFn = (data: any) => { //增加序号
    let orderBl = true;
    for(let i in data){
        if(data[i].dataIndex === 'ORDERNO'){
            orderBl = false;
            break;
        }
    }
    const orderInfo = {
        title: '序号',
        dataIndex: 'ORDERNO',
        width: 60,
        fixed: 'left'
    }
    if(orderBl){
        data.unshift(orderInfo);
    }
    return data;
}
export const trDataSourceFn = (data: any | undefined) => {//增加序号表头字段
    if(!data) return;
    for (let i = 0; i < data.length; i++) {
        data[i]['ORDERNO'] = (i + 1);
        data[i]['SELECTBL'] = false;
    }

    return data;
}
